﻿/**
 * 预览插件
 */
(function(E, $){

var headHTML = '', urlBase='';

E.plugin("Preview", {
	icon: {
		width: 40,
		text: '预 览',
		
		'default': {
			'Preview': {XY:"none" }
		}
	},
	
	click: function( ){
		var html = E.getHTML(),
			win,
			dom;
			
		html='<html><head>'+headHTML+'<title>预览</title>'+(urlBase?'<base href="'+urlBase+'"/>':'')+'</head><body>' + html + '</body></html>';
		
		win = window.open('', '_blank', "");
		dom=win.document;
		dom.open();
		dom.write(html);
		dom.close();
		win.focus();
	}
	
});

})(jQEditor, jQuery);